/**
 * Created by tomi on 1/30/15.
 */
var ResponseCode = require('./ResponseNumber');

var ResponseUtil = {
    OK: function (res, data) {
        res.json({
            responseCode: ResponseCode.ok,
            data: data
        });
    },
    ERROR: function (res, code, data) {
        res.json({
            responseCode: code ? code : ResponseCode.common_error,
            data: data
        });
    }
};


module.exports = ResponseUtil;